package main

import "fmt"

func main() {
	var a int
	void()
	fmt.Println(a, dummy(0))

	//执行go run -gcflags "-m -l" 1.变量逃逸分析.go
}

func void() {

}

func dummy(b int) *int {
	var c int
	c = b
	return &c
	//c被取地址，所以c会移动到堆
}
